# KERNEL_DIR=/home/zzlyang/code/ebf_linux_kernel_6ull_depth1/build_image/build
KERNEL_DIR=/home/zzlyang/code/ebf_6ull_linux


ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf-
export  ARCH  CROSS_COMPILE

obj-m := DetectKeyDriver.o		# 表示编译为Linux内核模块

EXTRA_CFLAGS += -fno-pic -std=gnu99 -Wno-declaration-after-statement
# EXTRA_CFLAGS :=-fno-pic -std=GNU99
all:
	$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR)  modules
	EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
	$(CROSS_COMPILE)gcc -o keyDetect_app  keyApp.c
.PHONY:clean copy

clean:
	$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) clean	

copy:
	sudo  cp  *.ko  /home/embedfire/workdir

